package com.gitee.helioz.openai.api.dto.completions;

import com.gitee.helioz.openai.api.dto.UsageDTO;
import com.google.gson.annotations.SerializedName;
import lombok.Data;

import java.util.List;

/**
 * 〈补全响应对象〉
 *
 * @author <a href="https://gitee.com/helioz">Morning Starr</a>
 */
@Data
public class CompletionResponse {
    private String id;
    private String object;
    private Long created;
    private String model;
    private List<Choice> choices;
    private UsageDTO usage;

    @Data
    public static class Choice {
        private String text;
        private Integer index;
        private Object logprobs;
        @SerializedName("finish_reason")
        private String finishReason;
    }

}
